.drawing-board {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 5px;

  &:empty {
    &::after {
      content: '从左侧拖入或点选组件进行表单设计';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100%;
      text-align: center;
      color: var(--el-text-color-placeholder);
      font-size: 18px;
    }
  }
}

.editor-form {
  height: 100%;
  border: 1px dashed var(--el-border-color);

  &.is-active {
    border: 1px solid var(--el-color-primary);
  }

  .drawing-item {
    position: relative;
    width: 100%;
    border: 1px dashed var(--el-border-color);

    &:hover,
    &.active {
      background-color: var(--el-color-primary-light-9);
    }

    .el-form-item {
      &:before {
        content: '';
        position: absolute;
        z-index: 6;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: transparent;
      }
    }

    & > .pointer-move {
      position: absolute;
      z-index: 10;
      left: 0;
      top: 0;
      width: 22px;
      height: 22px;
      opacity: 0.6;
      cursor: move;
      display: flex;
      align-items: center;
      justify-content: center;
      border-bottom-right-radius: 6px;
      background-color: var(--el-color-primary);

      &:hover {
        opacity: 1;
      }

      i {
        color: var(--el-color-primary-light-9);
      }
    }

    & > .pointer-wrapper {
      position: absolute;
      z-index: 99;
      right: 0;
      bottom: 0;
      line-height: 22px;
      display: flex;
      align-items: center;
      border-top-left-radius: 6px;
      background-color: var(--el-color-primary);

      div {
        width: 20px;
        height: 20px;
        display: inline-block;
        text-align: center;
        margin-left: 2px;
        cursor: pointer;

        i {
          color: var(--el-color-primary-light-9);
        }
      }
    }

    &.active {
      border: 1px solid var(--el-color-primary);
    }
    &.is_hidden {
      background: var(--el-color-danger-light-9);
      opacity: 0.7;
    }

    .field-wrapper {
      padding: 5px 10px 16px;
      margin-bottom: 0;
    }
  }
}

.widget-list {
  width: auto;
  min-height: 65px;
  overflow: hidden;
  background: var(--el-bg-color);
  border: 2px solid var(--el-border-color);
  padding: 3px;
  position: relative;
  z-index: 7;

  &:empty {
    &::after {
      content: '将字段拖放到此区域';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: var(--el-text-color-secondary);
      font-size: 14px;
      letter-spacing: 2px;
      text-align: center;
      z-index: 1;
    }
  }
}
